﻿<nz-card [nzBordered]="false">
<form nz-form [formGroup]="validateForm" *ngIf="active">
      <nz-form-item>
        <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="appId" nzRequired>
          <span>
             应用APPID
            <i nz-icon nz-tooltip nzTitle="请输入应用APPID" type="question-circle" theme="outline"></i>
          </span>
        </nz-form-label>
        <nz-form-control [nzSm]="14" [nzXs]="24">
          <input nz-input id="appId" formControlName="appId" [(ngModel)]="alipaySetting.appId" >
          <nz-form-explain *ngIf="validateForm.get('appId').dirty && validateForm.get('appId').errors">请输入应用APPID!</nz-form-explain>
        </nz-form-control>
      </nz-form-item>
      <nz-form-item>
        <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="gatewayUrl" nzRequired>
          <span>
             支付宝网关
            <i nz-icon nz-tooltip nzTitle="请输入支付宝网关" type="question-circle" theme="outline"></i>
          </span>
        </nz-form-label>
        <nz-form-control [nzSm]="14" [nzXs]="24">
          <input nz-input id="gatewayUrl" formControlName="gatewayUrl" [(ngModel)]="alipaySetting.gatewayUrl" >
          <nz-form-explain *ngIf="validateForm.get('gatewayUrl').dirty && validateForm.get('gatewayUrl').errors">请输入支付宝网关!</nz-form-explain>
        </nz-form-control>
      </nz-form-item>
      <nz-form-item>
        <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="merchantPrivateKey" nzRequired>
          <span>
             商家私钥
            <i nz-icon nz-tooltip nzTitle="请输入商家私钥" type="question-circle" theme="outline"></i>
          </span>
        </nz-form-label>
        <nz-form-control [nzSm]="14" [nzXs]="24">
          <input nz-input id="merchantPrivateKey" formControlName="merchantPrivateKey" [(ngModel)]="alipaySetting.merchantPrivateKey" >
          <nz-form-explain *ngIf="validateForm.get('merchantPrivateKey').dirty && validateForm.get('merchantPrivateKey').errors">请输入商家私钥!</nz-form-explain>
        </nz-form-control>
      </nz-form-item>
      <nz-form-item>
        <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="alipayPublicKey" nzRequired>
          <span>
             商家公钥
            <i nz-icon nz-tooltip nzTitle="请输入商家公钥" type="question-circle" theme="outline"></i>
          </span>
        </nz-form-label>
        <nz-form-control [nzSm]="14" [nzXs]="24">
          <input nz-input id="alipayPublicKey" formControlName="alipayPublicKey" [(ngModel)]="alipaySetting.alipayPublicKey" >
          <nz-form-explain *ngIf="validateForm.get('alipayPublicKey').dirty && validateForm.get('alipayPublicKey').errors">请输入商家公钥!</nz-form-explain>
        </nz-form-control>
      </nz-form-item>
      <nz-form-item>
        <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="notifyUrl">
          <span>
             服务器通知路径
            <i nz-icon nz-tooltip nzTitle="请输入服务器通知路径" type="question-circle" theme="outline"></i>
          </span>
        </nz-form-label>
        <nz-form-control [nzSm]="14" [nzXs]="24">
          <input nz-input id="notifyUrl" formControlName="notifyUrl" [(ngModel)]="alipaySetting.notifyUrl" >
          <nz-form-explain *ngIf="validateForm.get('notifyUrl').dirty && validateForm.get('notifyUrl').errors">请输入服务器通知路径!</nz-form-explain>
        </nz-form-control>
      </nz-form-item>
      <nz-form-item>
        <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="returnUrl">
          <span>
             页面跳转路径
            <i nz-icon nz-tooltip nzTitle="请输入页面跳转路径" type="question-circle" theme="outline"></i>
          </span>
        </nz-form-label>
        <nz-form-control [nzSm]="14" [nzXs]="24">
          <input nz-input id="returnUrl" formControlName="returnUrl" [(ngModel)]="alipaySetting.returnUrl" >
          <nz-form-explain *ngIf="validateForm.get('returnUrl').dirty && validateForm.get('returnUrl').errors">请输入页面跳转路径!</nz-form-explain>
        </nz-form-control>
      </nz-form-item>
   <nz-form-item nz-row style="margin-bottom: 8px;">
      <nz-form-control [nzSpan]="14" [nzOffset]="6">
        <button nz-button type="submit" [nzType]="'primary'" (click)="handleSave()" [nzLoading]="isConfirmLoading">保存</button>
      </nz-form-control>
    </nz-form-item>
  </form>
</nz-card>